<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE>BNF for ImolaGRM.jtb</TITLE>
</HEAD>
<BODY>
<H1 ALIGN=CENTER>BNF for ImolaGRM.jtb</H1>
<H2 ALIGN=CENTER>TOKENS</H2>
<TABLE>
 <!-- Token -->
 <TR>
  <TD>
   <PRE>
&lt;DEFAULT&gt; SKIP : {
" "
| "\t"
| "\n"
| "\r"
| &lt;"//" (~["\n","\r"])* ("\n" | "\r" | "\r\n")&gt;
| &lt;"/*" (~["*"])* "*" (~["/"] (~["*"])* "*")* "/"&gt;
}

   </PRE>
  </TD>
 </TR>
 <!-- Token -->
 <TR>
  <TD>
   <PRE>
&lt;DEFAULT&gt; TOKEN : {
&lt;INT: "INT"&gt;
| &lt;FLOAT: "FLOAT"&gt;
| &lt;IMG: "IMG"&gt;
| &lt;STRING: "STRING"&gt;
| &lt;OPDEF: "#DEFINE OPERATOR"&gt;
}

   </PRE>
  </TD>
 </TR>
 <!-- Token -->
 <TR>
  <TD>
   <PRE>
&lt;DEFAULT&gt; TOKEN : {
&lt;BUILTIN: &lt;LOAD&gt; | &lt;SAVE&gt; | &lt;SHOW&gt; | &lt;CLOSE&gt; | &lt;CLOSEALL&gt; | &lt;WAITKEY&gt; | &lt;IID_NOISE&gt; | &lt;IMP_NOISE&gt; | &lt;ERODE&gt; | &lt;DILATE&gt; | &lt;GLOBAL_THRES&gt; | &lt;CONTRAST_STRETCH&gt; | &lt;EQUALIZE&gt; | &lt;MEAN_SMOOTHING&gt; | &lt;GAUSS_SMOOTHING&gt; | &lt;BILATERAL_SMOOTHING&gt; | &lt;MEDIAN_SMOOTHING&gt; | &lt;SUM&gt; | &lt;DIFF&gt; | &lt;ABSDIFF&gt; | &lt;AND&gt; | &lt;OR&gt; | &lt;NOT&gt; | &lt;SET&gt; | &lt;INVERT&gt; | &lt;COPY&gt;&gt;
| &lt;#LOAD: "LOAD"&gt;
| &lt;#SAVE: "SAVE"&gt;
| &lt;#SHOW: "SHOW"&gt;
| &lt;#CLOSE: "CLOSE"&gt;
| &lt;#CLOSEALL: "CLOSEALL"&gt;
| &lt;#WAITKEY: "WAITKEY"&gt;
| &lt;#IID_NOISE: "IID_NOISE"&gt;
| &lt;#IMP_NOISE: "IMP_NOISE"&gt;
| &lt;#ERODE: "ERODE"&gt;
| &lt;#DILATE: "DILATE"&gt;
| &lt;#GLOBAL_THRES: "GLOBAL_THRES"&gt;
| &lt;#CONTRAST_STRETCH: "CONTRAST_STRETCH"&gt;
| &lt;#EQUALIZE: "EQUALIZE"&gt;
| &lt;#MEAN_SMOOTHING: "MEAN_SMOOTHING"&gt;
| &lt;#GAUSS_SMOOTHING: "GAUSS_SMOOTHING"&gt;
| &lt;#BILATERAL_SMOOTHING: "BILATERAL_SMOOTHING"&gt;
| &lt;#MEDIAN_SMOOTHING: "MEDIAN_SMOOTHING"&gt;
| &lt;#SUM: "SUM"&gt;
| &lt;#DIFF: "DIFF"&gt;
| &lt;#ABSDIFF: "ABSDIFF"&gt;
| &lt;#AND: "AND"&gt;
| &lt;#OR: "OR"&gt;
| &lt;#NOT: "NOT"&gt;
| &lt;#SET: "SET"&gt;
| &lt;#INVERT: "INVERT"&gt;
| &lt;#COPY: "COPY"&gt;
}

   </PRE>
  </TD>
 </TR>
 <!-- Token -->
 <TR>
  <TD>
   <PRE>
&lt;DEFAULT&gt; TOKEN : {
&lt;LB: "("&gt;
| &lt;RB: ")"&gt;
| &lt;LCB: "{"&gt;
| &lt;RCB: "}"&gt;
| &lt;SCOL: ";"&gt;
| &lt;COMMA: ","&gt;
| &lt;EQ: "="&gt;
}

   </PRE>
  </TD>
 </TR>
 <!-- Token -->
 <TR>
  <TD>
   <PRE>
&lt;DEFAULT&gt; TOKEN : {
&lt;INTVALUE: "0" | &lt;DIGITNONZERO&gt; (&lt;DIGIT&gt;)*&gt;
| &lt;FLOATVALUE: (&lt;INTVALUE&gt;)+ "." (&lt;INTVALUE&gt;)+&gt;
| &lt;STRINGVALUE: "\"" &lt;STRINGANY&gt; "\""&gt;
| &lt;DEFNAME: &lt;LETTERUC&gt; (&lt;LETTERUC&gt; | "_")*&gt;
| &lt;#DIGIT: ["0"-"9"]&gt;
| &lt;#DIGITNONZERO: ["1"-"9"]&gt;
| &lt;#LETTERLC: ["a"-"z"]&gt;
| &lt;#LETTERUC: ["A"-"Z"]&gt;
| &lt;#STRINGANY: (&lt;LETTERLC&gt; | &lt;LETTERUC&gt; | &lt;DIGIT&gt; | "_" | "." | "/" | "\\" | ":" | " " | "*" | "-")+&gt;
}

   </PRE>
  </TD>
 </TR>
 <!-- Token -->
 <TR>
  <TD>
   <PRE>
&lt;DEFAULT&gt; TOKEN : {
&lt;VARNAME: &lt;LETTERLC&gt; (&lt;LETTERLC&gt; | &lt;LETTERUC&gt; | &lt;DIGIT&gt;)*&gt;
}

   </PRE>
  </TD>
 </TR>
</TABLE>
<H2 ALIGN=CENTER>NON-TERMINALS</H2>
<TABLE>
<TR>
<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod1">Root</A></TD>
<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
<TD ALIGN=LEFT VALIGN=BASELINE>( <A HREF="#prod2">Definition</A> )* ( <A HREF="#prod3">Declaration</A> | <A HREF="#prod4">Call</A> )+ &lt;EOF&gt;</TD>
</TR>
<TR>
<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod2">Definition</A></TD>
<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
<TD ALIGN=LEFT VALIGN=BASELINE>&lt;OPDEF&gt; &lt;DEFNAME&gt; &lt;LB&gt; <A HREF="#prod5">FormalParamList</A> &lt;RB&gt; &lt;LCB&gt; ( <A HREF="#prod3">Declaration</A> | <A HREF="#prod4">Call</A> )+ &lt;RCB&gt;</TD>
</TR>
<TR>
<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod3">Declaration</A></TD>
<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod6">ImgDecl</A></TD>
</TR>
<TR>
<TD ALIGN=RIGHT VALIGN=BASELINE></TD>
<TD ALIGN=CENTER VALIGN=BASELINE>|</TD>
<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod7">IntDecl</A></TD>
</TR>
<TR>
<TD ALIGN=RIGHT VALIGN=BASELINE></TD>
<TD ALIGN=CENTER VALIGN=BASELINE>|</TD>
<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod8">FloatDecl</A></TD>
</TR>
<TR>
<TD ALIGN=RIGHT VALIGN=BASELINE></TD>
<TD ALIGN=CENTER VALIGN=BASELINE>|</TD>
<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod9">StringDecl</A></TD>
</TR>
<TR>
<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod4">Call</A></TD>
<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
<TD ALIGN=LEFT VALIGN=BASELINE>( &lt;BUILTIN&gt; | &lt;DEFNAME&gt; ) &lt;LB&gt; ( <A HREF="#prod10">ActualParamList</A> )? &lt;RB&gt; &lt;SCOL&gt;</TD>
</TR>
<TR>
<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod6">ImgDecl</A></TD>
<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
<TD ALIGN=LEFT VALIGN=BASELINE>&lt;IMG&gt; &lt;VARNAME&gt; ( &lt;COMMA&gt; &lt;VARNAME&gt; )* &lt;SCOL&gt;</TD>
</TR>
<TR>
<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod7">IntDecl</A></TD>
<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
<TD ALIGN=LEFT VALIGN=BASELINE>&lt;INT&gt; &lt;VARNAME&gt; &lt;EQ&gt; &lt;INTVALUE&gt; &lt;SCOL&gt;</TD>
</TR>
<TR>
<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod8">FloatDecl</A></TD>
<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
<TD ALIGN=LEFT VALIGN=BASELINE>&lt;FLOAT&gt; &lt;VARNAME&gt; &lt;EQ&gt; &lt;FLOATVALUE&gt; &lt;SCOL&gt;</TD>
</TR>
<TR>
<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod9">StringDecl</A></TD>
<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
<TD ALIGN=LEFT VALIGN=BASELINE>&lt;STRING&gt; &lt;VARNAME&gt; &lt;EQ&gt; &lt;STRINGVALUE&gt; &lt;SCOL&gt;</TD>
</TR>
<TR>
<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod5">FormalParamList</A></TD>
<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod11">FormalParameter</A> ( &lt;COMMA&gt; <A HREF="#prod11">FormalParameter</A> )*</TD>
</TR>
<TR>
<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod10">ActualParamList</A></TD>
<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod12">ActualParameter</A> ( &lt;COMMA&gt; <A HREF="#prod12">ActualParameter</A> )*</TD>
</TR>
<TR>
<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod11">FormalParameter</A></TD>
<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
<TD ALIGN=LEFT VALIGN=BASELINE>( &lt;INT&gt; | &lt;FLOAT&gt; | &lt;IMG&gt; | &lt;STRING&gt; ) &lt;VARNAME&gt;</TD>
</TR>
<TR>
<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod12">ActualParameter</A></TD>
<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
<TD ALIGN=LEFT VALIGN=BASELINE>( &lt;VARNAME&gt; | &lt;STRINGVALUE&gt; | &lt;FLOATVALUE&gt; | &lt;INTVALUE&gt; )</TD>
</TR>
</TABLE>
</BODY>
</HTML>
